

interface IShape {
    public int a = 10;

    public static final int bb = 2;
    int c = 3;
    public void draw();
    public static void func() {
        System.out.println("hh");
    }
}

public class Test {
    public static void main(String[] args) {
        //IShape iShape = new IShape();
    }
}
abstract class Shape {
    public int age;

    public Shape(int age) {
        this.age = age;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public abstract void draw();
}
abstract class Rect extends Shape {
    public Rect() {
        super(12);
    }
    ;
}
class A extends  Rect {
    public void draw() {
        System.out.println();
    }
}
class Cycle extends Shape {
    public Cycle() {
        super(11);
    }
    public void draw() {
        System.out.println("画圆型");
    }
}
class Flower extends Shape {
    public Flower() {
        super(1);
    }
    public void draw() {
        System.out.println("画花");
    }
}

/*public class Test {
    public  void func(Shape shape) {
        shape.draw();
    }
    public static void main(String[] args) {
        Test test = new Test();

        test.func(new Flower());
        test.func(new Cycle());


    }
}*/
/*
class t {
    public static int staticnum = 100;
    public int date = 111;

    {
        // 一般用于初始化非静态成员变量
        System.out.println("实例代码块被执行了。。。");
        this.date = 222;
    }
    static {
        System.out.println("静态代码块被执行了。。。");
        staticnum = 200;
    }
    public t() {
        System.out.println("构造方法被执行了。。。");
    }

}
public class Test {
    public static void main(String[] args) {
        t test1 = new t();
        System.out.println(test1.date);
        System.out.println(t.staticnum);
    }
}
*/






